package top.kaoshanji.p2ch17c;

/**
 * 代码清单-p2ch17c-200页c：场景类
 * @author kaoshanji
 * ^_^
 * create time 2025/3/24 11:27
 */
public class Client {

    public static void main(String[] args) {

        Component component = new ConcreteComponent();

        // 第一次装饰
        component = new ConcreteDecorator1(component);

        // 第二次装饰
        component = new ConcreteDecorator2(component);

        // 装饰后运行
        component.operate();

    }


}
